/*****************************************************************
File name   : api_alarm.h
Author      : liukaihua 
Version     : Ver1.0.0
Date        : 2022-01-26
Description : 关于报警的处理
Others      : 
History     : 
    1. Date:
       Author: ID:
       Modification:
    2. ...
*****************************************************************/

#ifndef __API_ALARM_VOICE_H_
#define __API_ALARM_VOICE_H_

#include "stdint.h"

/****************************************************************************/ 

//#define BEEP_PIN                          GPIO_PIN_11
//#define BEEP_GPIO_PORT                    GPIOA
//#define BEEP_GPIO_CLK                     RCU_GPIOA

//#define KEY_BEEP_PIN											GPIO_PIN_0
//#define KEY_BEEP_GPIO_PORT								GPIOE
//#define KEY_BEEP_GPIO_CLK									RCU_GPIOE

#define EN_ALARM_PIN								      GPIO_PIN_7
#define EN_ALARM_GPIO_PORT                GPIOD
#define EN_ALARM_GPIO_CLK                 RCU_GPIOD

//#define BEEP_ON                   				GPIO_BOP(BEEP_GPIO_PORT) = BEEP_PIN
//#define BEEP_OFF                    			GPIO_BC(BEEP_GPIO_PORT) = BEEP_PIN

//#define KEY_BEEP_ON                   		GPIO_BOP(KEY_BEEP_GPIO_PORT) = KEY_BEEP_PIN
//#define KEY_BEEP_OFF                    	GPIO_BC(KEY_BEEP_GPIO_PORT) = KEY_BEEP_PIN

#define ALARM_EN                     		  GPIO_BOP(EN_ALARM_GPIO_PORT) = EN_ALARM_PIN
#define ALARM_UNEN                    	  GPIO_BC(EN_ALARM_GPIO_PORT) = EN_ALARM_PIN

void ALARM_VOICE_Thread(void *argument);
void beep_init(void);
void alarm_MediumVoice(void);
void alarm_LowVoice(void);

#endif
/* [] END OF FILE */
